#!/bin/usr/env python

user_name = 'Leslie'
user_age = 18

# 同时输出多个变量和字符串(默认分隔符为空格)
print("读者名:", user_name, "年龄:", user_age)

# 同时输出多个变量和字符串，制定分隔符
print("读者名:", user_name, "年龄:", user_age, sep='|')

# 设置print函数不换行，只需设置end参数即可
print(40, '\t', end='')
print(50, '\t', end='')


print(60, '\t', end='')

f = open('poem.txt', 'w', encoding='utf-8')  # 打开文件以便写入
print("海上生明月", file=f)
print("天涯共此时", file=f)

f.close()
